package com.ruoyi.zhifubao.service.impl;

import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.zhifubao.domain.SysTestZhifubao;
import com.ruoyi.zhifubao.mapper.SysTestZhifubaoMapper;
import com.ruoyi.zhifubao.service.ISysTestZhifubaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 支付宝测试Service业务层处理
 *
 * @author yanghua
 * @date 2020-10-13
 */
@Service
public class SysTestZhifubaoServiceImpl implements ISysTestZhifubaoService {
    @Autowired
    private SysTestZhifubaoMapper sysTestZhifubaoMapper;

    /**
     * 查询支付宝测试
     *
     * @param zfbId 支付宝测试ID
     * @return 支付宝测试
     */
    @Override
    public SysTestZhifubao selectSysTestZhifubaoById(Long zfbId) {
        return sysTestZhifubaoMapper.selectSysTestZhifubaoById(zfbId);
    }

    /**
     * 查询支付宝测试列表
     *
     * @param sysTestZhifubao 支付宝测试
     * @return 支付宝测试
     */
    @Override
    public List<SysTestZhifubao> selectSysTestZhifubaoList(SysTestZhifubao sysTestZhifubao) {
        return sysTestZhifubaoMapper.selectSysTestZhifubaoList(sysTestZhifubao);
    }

    /**
     * 新增支付宝测试
     *
     * @param sysTestZhifubao 支付宝测试
     * @return 结果
     */
    @Override
    public int insertSysTestZhifubao(SysTestZhifubao sysTestZhifubao) {
        sysTestZhifubao.setCreateTime(DateUtils.getNowDate());
        return sysTestZhifubaoMapper.insertSysTestZhifubao(sysTestZhifubao);
    }

    /**
     * 修改支付宝测试
     *
     * @param sysTestZhifubao 支付宝测试
     * @return 结果
     */
    @Override
    public int updateSysTestZhifubao(SysTestZhifubao sysTestZhifubao) {
        sysTestZhifubao.setUpdateTime(DateUtils.getNowDate());
        return sysTestZhifubaoMapper.updateSysTestZhifubao(sysTestZhifubao);
    }

    /**
     * 批量删除支付宝测试
     *
     * @param zfbIds 需要删除的支付宝测试ID
     * @return 结果
     */
    @Override
    public int deleteSysTestZhifubaoByIds(Long[] zfbIds) {
        return sysTestZhifubaoMapper.deleteSysTestZhifubaoByIds(zfbIds);
    }

    /**
     * 删除支付宝测试信息
     *
     * @param zfbId 支付宝测试ID
     * @return 结果
     */
    @Override
    public int deleteSysTestZhifubaoById(Long zfbId) {
        return sysTestZhifubaoMapper.deleteSysTestZhifubaoById(zfbId);
    }
}
